﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="zh-cn">
<head>
    <meta charset="utf-8" />
    <title>管理登陆</title>
    <meta name="author" content="lf" />
    <script type="text/javascript" src="../js/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" src="js/player.js"></script>
    <!--[if lte IE 6]>
        <script src="js/pngfixed.js" type="text/javascript"></script>
        <script> DD_belatedPNG.fix('img,#lbtn,#loginarea .filed .input,#loginarea .filedBtn .subBtn,#area li,#BalloonA,#BalloonB,#regbox,#rbtn,#aside #sidetop,#aside #dasbard,#wrap,#postblog .pop,#header #tool #side #menuSideBtn,#header #nav li.current,#header #logo a,#aside #search input.btn,#aside #search,#aside .hr,#article .box .top .jiao,.contentTop');</script>
        <![endif]-->
    <script src="js/login.js"></script>
    <link href="50/login.css" rel="stylesheet" />
    <style>
        #wrap {
        
        position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    top: 0;
    bottom: 0;

        }
        #regbox {
    margin-top: 100px;
         }

        #logo img {
        
        max-height:120px;
        }
     </style>

</head>
<body>
    <div id="wrap">
        <div id="main">
            <div id="rbtn">
                <a href="/">返回首页</a></div>
            <div id="logo">
                <a href="/">
                    <img src="<%=mimg %>" alt="logo" /></a></div>
            <div id="BalloonA">
            </div>
            <div id="BalloonB">
            </div>
            <div style="height: 65px; clear: both">
            </div>
            <table border="0" align="center" cellpadding="0" cellspacing="0" id="regbox">
                <tr>
                    <td width="386" rowspan="2" valign="top">
                        <form id="form1" runat="server">
                        <div id="regarea">
                            <h1>
                                登 陆
                            </h1>
                            <div style="background: url(Images/hint.gif) 0 6px no-repeat; padding-left: 15px;
                                padding-top: 5px; float: right">
                                提示：<asp:Label ID="lbMsg" runat="server" Text="如果登录失败3次，需关闭后才能重新登录" ForeColor="Red"></asp:Label>
                            </div>
                            <div class="clear">
                            </div>
                            <div class="filed">
                              
                                <asp:TextBox ID="txtUserName" runat="server" CssClass="input uname" placeholder="用户名"></asp:TextBox>
                            </div>
                            <div class="clear">
                            </div>
                            <div class="filed">
                            
                                <asp:TextBox ID="txtUserPwd" runat="server" CssClass="input passw" placeholder="密码" TextMode="Password" ></asp:TextBox>
                            </div>
                            <div class="clear">
                            </div>
                            <div class="filed" >
                        
                                <script type="text/javascript" language="JavaScript">
                                    var numkey = Math.random();
                                    numkey = Math.round(numkey * 10000);
                                    document.write("<img src=\"../dis/imgcode.aspx?k=" + numkey + "\" width=\"70\" onClick=\"this.src+=Math.random()\" alt=\"图片看不清？点击重新得到验证码\" style=\"cursor:pointer;\" height=\"25\" hspace=\"4\">");
                                </script>
                                <asp:TextBox ID="TextCode" runat="server" CssClass="input2"  placeholder="验证码"></asp:TextBox>
                            </div>
                            <div class="clear">
                            </div>
                            <div class="filed">
                                <label class="nocontent">
                                </label>
           <asp:Button ID="LoginBUT" runat="server" Text="登   录"  CssClass="loginbut" OnClientClick ="charpw()"  OnClick="LoginBUT_Click" />
                             
                                <span class="regcurr"></span>
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        </form>
                    </td>
                </tr>
            </table>
        </div>
        <div id="footer">
        </div>
        <div id="copyright">
            <div class="copy">
                <a href="sa" target="_blank"> <%=mname %></a>
            </div>
        </div>
    </div>
    <script src="/js/base64.js" language="javascript"></script>
     <script type="text/javascript">
         function charpw() {
             var password = $("#txtUserPwd").val(); 
             var base = new Base64();
             var encypass = base.encode(password);//base64位加密
             $('#txtUserPwd').val(encypass)
           
         }
    </script>

    	<script type="text/javascript" src="img/ThreeWebGL.js"></script>
		<script type="text/javascript" src="img/ThreeExtras.js"></script>
		<script type="text/javascript" src="img/Detector.js"></script>
		<script type="text/javascript" src="img/RequestAnimationFrame.js"></script>
		<script id="vs" type="x-shader/x-vertex">
			varying vec2 vUv; void main() { vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); }
		</script>
		<script id="fs" type="x-shader/x-fragment">
			uniform sampler2D map; uniform vec3 fogColor; uniform float fogNear; uniform float fogFar; varying vec2 vUv; void main() { float depth = gl_FragCoord.z / gl_FragCoord.w; float fogFactor = smoothstep( fogNear, fogFar, depth ); gl_FragColor = texture2D( map, vUv ); gl_FragColor.w *= pow( gl_FragCoord.z, 20.0 ); gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor ); }

		</script>
		<script type="text/javascript">
            if (!Detector.webgl) Detector.addGetWebGLMessage();
            var canvas = document.createElement('canvas');
            canvas.width = 32;
            canvas.height = window.innerHeight;
            var context = canvas.getContext('2d');
            var gradient = context.createLinearGradient(0, 0, 0, canvas.height);
            gradient.addColorStop(0, "#1e4877");
            gradient.addColorStop(0.5, "#4584b4");
            context.fillStyle = gradient;
            context.fillRect(0, 0, canvas.width, canvas.height);
            document.body.style.background = 'url(' + canvas.toDataURL('image/png') + ')';
            var container;
            var camera, scene, renderer, sky, mesh, geometry, material, i, h, color, colors = [],
                sprite, size, x, y, z;
            var mouseX = 0,
                mouseY = 0;
            var start_time = new Date().getTime();
            var windowHalfX = window.innerWidth / 2;
            var windowHalfY = window.innerHeight / 2;
            init();
            animate();

            function init() {
                container = document.createElement('div');
                document.body.appendChild(container);
                camera = new THREE.Camera(30, window.innerWidth / window.innerHeight, 1, 3000);
                camera.position.z = 6000;
                scene = new THREE.Scene();
                geometry = new THREE.Geometry();
                var texture = THREE.ImageUtils.loadTexture('');
                texture.magFilter = THREE.LinearMipMapLinearFilter;
                texture.minFilter = THREE.LinearMipMapLinearFilter;
                var fog = new THREE.Fog(0x4584b4, -100, 3000);
                material = new THREE.MeshShaderMaterial({
                    uniforms: {
                        "map": {
                            type: "t",
                            value: 2,
                            texture: texture
                        },
                        "fogColor": {
                            type: "c",
                            value: fog.color
                        },
                        "fogNear": {
                            type: "f",
                            value: fog.near
                        },
                        "fogFar": {
                            type: "f",
                            value: fog.far
                        },
                    },
                    vertexShader: document.getElementById('vs').textContent,
                    fragmentShader: document.getElementById('fs').textContent,
                    depthTest: false
                });
                var plane = new THREE.Mesh(new THREE.Plane(64, 64));
                for (i = 0; i < 8000; i++) {
                    plane.position.x = Math.random() * 1000 - 500;
                    plane.position.y = -Math.random() * Math.random() * 200 - 15;
                    plane.position.z = i;
                    plane.rotation.z = Math.random() * Math.PI;
                    plane.scale.x = plane.scale.y = Math.random() * Math.random() * 1.5 + 0.5;
                    GeometryUtils.merge(geometry, plane)
                }
                mesh = new THREE.Mesh(geometry, material);
                scene.addObject(mesh);
                mesh = new THREE.Mesh(geometry, material);
                mesh.position.z = -8000;
                scene.addObject(mesh);
                renderer = new THREE.WebGLRenderer({
                    antialias: false
                });
                renderer.setSize(window.innerWidth, window.innerHeight);
                container.appendChild(renderer.domElement);
                document.addEventListener('mousemove', onDocumentMouseMove, false);
                window.addEventListener('resize', onWindowResize, false)
            }

            function onDocumentMouseMove(event) {
                mouseX = (event.clientX - windowHalfX) * 0.25;
                mouseY = (event.clientY - windowHalfY) * 0.15
            }

            function onWindowResize(event) {
                camera.aspect = window.innerWidth / window.innerHeight;
                camera.updateProjectionMatrix();
                renderer.setSize(window.innerWidth, window.innerHeight)
            }

            function animate() {
                requestAnimationFrame(animate);
                render()
            }

            function render() {
                position = ((new Date().getTime() - start_time) * 0.03) % 8000;
                camera.position.x += (mouseX - camera.target.position.x) * 0.01;
                camera.position.y += (-mouseY - camera.target.position.y) * 0.01;
                camera.position.z = -position + 8000;
                camera.target.position.x = camera.position.x;
                camera.target.position.y = camera.position.y;
                camera.target.position.z = camera.position.z - 1000;
                renderer.render(scene, camera)
            }
		</script>

</body>
</html>
